package IO流.标准输出流.PrintStream.Test01;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;

public class PrintStreamTest01 {
    public static void main(String[] args) {
        PrintStream ps = System.out;
        ps.println("我真是嗨到不行啊，jojo");
        PrintStream printStream = null;
        try {
            printStream = new PrintStream(new FileOutputStream("javase/src/IO流/标准输出流演示文件"));
            printStream.flush();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        System.setOut(printStream);
        System.out.println("马撒卡，你也是替身使者！！！");
        System.out.println("最后的绿宝石水花....");
    }
}
